package main;

public class Fibo {
	public static int fibo(int n) throws IllegalArgumentException {
		if (n<0)
			throw new IllegalArgumentException();
		else {
			int a=1, b=0, t;
			while (n-- > 0) {
				t = b;
				b += a;
				a = t;
			}
			return b;
		}
	}
}
